package weekend4;

public class ExceptionDemo {
    public static void main(String[] args) {

        Student zs=new Student();
        try {
            zs.setAge(25);
        } catch (IllegalAgeException e) {
            e.printStackTrace();
        }
        System.out.println("该学生年龄为："+zs.getAge()+"岁");
    }
}
